home *** CD-ROM | disk | FTP | other *** search
/ PC-Blue - MS DOS Public Domain Library / PC-Blue MS-DOS Public Domain Library - NYACC.iso / vol029 / temper.bas < prev    next >
Encoding:
BASIC Source File  |  1987-01-11  |  640 b   |  24 lines

  1. 2  REM temperature conversion program
  2. 10 CLS :KEY OFF
  3. 20 PRINT TAB(20) "TEMPERATURE CONVERSION PROGRAM":PRINT
  4. 30  F=32
  5. 40 C=0
  6. 50 PRINT "celsius to fahrenheit (c) or fahrenheit to celsius (f)?"
  7. 60 INPUT T$
  8. 70 IF T$="c" THEN 140
  9. 80 PRINT "enter the fahrenheit temperature"
  10. 90 INPUT F
  11. 100 C=(F-32)*5/9
  12. 110 C=CINT(C)
  13. 120 PRINT "the celsius temperature is: ";C;"degrees"
  14. 130 GOTO 200
  15. 140 PRINT "enter the celsius temperature"
  16. 150 INPUT C
  17. 160 F=(C*9/5)+32
  18. 170 F=CINT(F)
  19. 180 PRINT "the fahrenheit temperature is:";F;"degrees"
  20. 190 GOTO 200
  21. 200 PRINT
  22. 210 PRINT "Again (y/n) ?":INPUT A$
  23. 211 IF A$="Y" OR A$="y" THEN GOTO 50
  24. mp